<template>
  <div class="config-container">
    <el-form label-width="110px">
      <fieldset style="padding: 10px;border:solid 1px #dddddd;border-radius: 8px">
        <legend style="width: auto;margin-bottom: 1px;border-bottom:none;font-size: inherit;color: #4b4b4b;">X轴配置</legend>
        <el-form-item label="标题旋转角度：">
          <el-input v-model="chart.xaxes.rotation" type="number" placeholder="请输入标题旋转角度" class="w-100pc" @change="dataChange"></el-input>
        </el-form-item>
        <el-form-item label="标题格式化：">
          <el-input v-model="chart.xaxes.format" type="number" placeholder="请输入标题格式化" class="w-100pc" @change="dataChange"></el-input>
        </el-form-item>
        <el-form-item label="显示轴标题：">
          <el-radio v-model="chart.xaxes.display" :label="true" @change="dataChange">是</el-radio>
          <el-radio v-model="chart.xaxes.display" :label="false" @change="dataChange">否</el-radio>
        </el-form-item>
        <el-form-item label="轴标题：">
          <el-input v-model="chart.xaxes.scaleLabel" type="number" placeholder="请输入轴标题" class="w-100pc" @change="dataChange"></el-input>
        </el-form-item>
      </fieldset>

      <fieldset style="padding: 10px;border:solid 1px #dddddd;border-radius: 8px;margin-top:10px;">
        <legend style="width: auto;margin-bottom: 1px;border-bottom:none;font-size: inherit;color: #4b4b4b;">Y轴配置</legend>
        <el-form-item label="标题旋转角度：">
          <el-input v-model="chart.yaxes.rotation" type="number" placeholder="请输入标题旋转角度" class="w-100pc" @change="dataChange"></el-input>
        </el-form-item>
        <el-form-item label="显示轴标题：">
          <el-radio v-model="chart.yaxes.display" :label="true" @change="dataChange">是</el-radio>
          <el-radio v-model="chart.yaxes.display" :label="false" @change="dataChange">否</el-radio>
        </el-form-item>
        <el-form-item label="轴标题：">
          <el-input v-model="chart.yaxes.scaleLabel" type="number" placeholder="请输入轴标题" class="w-100pc" @change="dataChange"></el-input>
        </el-form-item>
      </fieldset>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    designer: {
      type: Object,
      default: () => {
        return {};
      }
    },
    // 图形数据对象
    chart: {
      type: Object,
      default: () => {
        return {
          dataset: {},
          xaxes: {},
          yaxes: {}
        };
      }
    },
    // 数据集集合
    datasets: {
      type: Array,
      default: () => {
        return [];
      }
    },
    // 数据集字段集合
    fields: {
      type: Array,
      default: () => {
        return [];
      }
    }
  },
  data () {
    return {};
  },
  methods: {
    dataChange () {}
  }
};
</script>

<style lang="scss" scoped>
.config-container {
  padding-bottom: 20px;
  .el-form-item {
    margin-bottom: 5px;
  }
  ::v-deep .el-form-item__label {
    padding: 0;
  }
}
</style>
